Repository navigation
fix(classification): a reply event's own copies take its owner's declaration; owner frame reaches every event slot (rf2-a1lj6, rf2-2co2d) - #11823
Merged
Conversation
…aration; owner frame reaches every event slot (rf2-a1lj6, rf2-2co2d) rf2-a1lj6: a resource or mutation continuation reply rides its :reply-to target event as the last argument, so the event's own run copies (live :rf.event/v, the bare :event error slot, the always-on :rf.observe/error record, the epoch :trigger-event) echoed the owner-declared value raw. redact-event-by-registration gains a per-argument layer: an argument carrying :rf.reply/work-kind goes to the new resources-published :resources/project-reply-event-arg hook, which applies the reply arms the FX carrier already takes (coarse owner claim, else the owner's declared paths, plus the :error envelope), resolving the owner in the event's frame view. The arms are one fn in trace_egress, shared by the carrier walk and the hook. The app's own :reply-to handler still receives the raw reply. rf2-2co2d: the 1-arity callers that hold the owner frame now pass it to the 2-arity, so a spawned actor's event takes its machine type's classification there too: projection's project-event-slot (the always-on records), the router's refused-event and commit-halt triggers, a mutation execute payload's :reply-to address, and a managed request's reply addresses. Core threads the frame through the :resources/project-execute-event-args and :http/project-managed-fx-args hooks.
mike-thompson-day8
marked this pull request as ready for review
October 30, 2026 00:19
mike-thompson-day8
added a commit
that referenced
this pull request
Oct 30, 2026
Merge: b037cf2 at 2026-10-30T00:21:21Z. Completeness: Both source beads are addressed: all continuation reply copies use owner declarations and every frame-holding event projection passes its frame. Full patch, complete source beads, hook consumers and regressions inspected. Correctness: The shared reply projector preserves raw app delivery and on-box scope semantics while covering coarse and path declarations. Instance versus singleton controls and reported fault plants exercise both fixes; hook producers and consumers agree on arity. No new actionable finding. Implementation quality: One shared family-reply projection prevents carrier/event drift; frame threading uses existing resolution and hooks. Changes remain internal and preserve convenient public arities. Findings: none. Source forward pointers: none.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes rf2-a1lj6 and rf2-2co2d. Both are one defect class at one chokepoint,
re-frame.classification/redact-event-by-registration. An event-bearing copy was classified only by(first event)'s own registration, so an owner's declaration never reached it.rf2-a1lj6: a reply event's own copies take its owner's declaration
A resource read reply or a mutation continuation reply arrives as the last argument of the app's
:reply-toevent (re-frame.reply/complete). That event's own run copies carried the owner-declared value raw: the live:rf.event/v, the bare:eventerror slot, the epoch:trigger-eventunder:rf.egress/include-event-args? true, and the always-on:rf.observe/errorrecord at the default sink profile. Reproduced at trunk, where all four leaked{:token "PW"}while the FX carrier copy redacted.redact-event-by-registrationgets a third layer. Each argument carrying:rf.reply/work-kindis handed to a new resources-published hook,:resources/project-reply-event-arg.:errorenvelope. It resolves the owner in the event's frame view (in-frame-view).trace-egress/project-family-reply-slots. The carrier walkproject-embedded-keysand the new hook both call it, so the event copy and the carrier copy agree by construction.:reply-tohandler still receives the raw reply.late_bind/directory.cljc.rf2-2co2d: the owner frame reaches every event slot
Every caller that holds the owner frame now passes it to the
[event frame-id]arity. A spawned actor's event therefore takes its machine type's classification at each of these sites:projection/redact-event-by-registration, underproject-event-slot(the always-on:rf.observe/*records);classified-trigger) and its commit-halt trigger;:reply-toaddress. Core threads the frame through:resources/project-execute-event-args, which is now(fn [args frame-id]);re-frame.http.privacy/project-managed-fx-args). Core threads the frame through:http/project-managed-fx-args, which is now(fn [args frame-id]).epoch/assembly.cljcdoes not read the hook. Its:trigger-eventis the emit-projected:rf.event/vof the event's run-start, so it inherits the fix.The bead's gate asks for "an action that throws". At trunk an action's own throw produces a structural
:rf.error/machine-action-exceptionrecord with no:event(by design,re-frame.machines.error-emit). The test therefore makes the action return an effect that throws. The resulting:rf.error/fx-handler-exceptionrecord carries the routed event, and at trunk it leaked the password raw.Tests
resources_reply_event_egress_cljs_testis new. It covers four owners (mutation and resource, path-declared and coarse) against targets that declare nothing. The FX carrier copy is the control, and every event copy must equal it. It also checks that an execute payload's:reply-toaddressed to a spawned actor takes the actor's type classification.spawned_actor_event_classification_testgets a new deftest for the always-on error record of a spawned instance's event. The singleton is the control.http_reply_address_actor_classification_testis new. It sends a managed request's three reply addresses to a spawned actor through core's trace projection. The singleton is the control.Planted faults, each run against its scoped namespace and then restored. Each restore was checked by blob hash against HEAD:
redact-event-by-registration: exit 1, 32 failures across all four owners (the always-on record, the live error trace, live:rf.event/v, the epoch trigger). The carrier-control assertions stayed green.projection'sproject-event-slotcall: exit 1. The instance assertion fails with the raw password; the singleton control passes.Quality gates
scripts/test-jvm-implementation.shon the rebased tree: captured exit 0. Measured: core 1470 / 4453, machines 708 / 1722, resources 597 / 1871, http 230 / 791 (trunk CI for http: 229 / 788). Every delta matches the prediction. The http JVM lane is in that roster.npm run test:cljson the rebased tree: captured exit 0, 0 compile warnings, 6805 tests / 19931 assertions. Trunk CI at 83c1be4 shows 6802 / 19873, so +3 / +58, the new resources namespace as predicted. The late-bind publication pins run in this lane; the JVMlate_bind_drift_testruns in core.scripts/lint_kondo.pyexit 0, with no findings in the touched files. Exit 0 also fromcheck_require_alias_dialect.py,check_test_lane_bijection.py,check_egress_walker_residue.py,check_retired_spellings.py,check_ambient_durable_reads.py,check_thrown_error_messages.py,check_keyword_catalogue_drift.pyandcheck-no-hardcoded-paths.sh.